Pulse width modulation (PWM) is a technique for controlling the power supplied to a load. A controller such as a microprocessor generates a periodic control signal which is modulated such that in each period, the signal is asserted for a certain time (the on time) and de-asserted for the rest of the period (the off time). The duty cycle refers to the ratio of the on time to the modulation period (or more generally the proportion of the on time relative to the period or off time). Note that on “on” and “off” may be nominal—they can either mean absolutely on and absolutely off, or switching between high and low levels relative to a “background” DC level.
The controller applies this pulse width modulated control signal to the input of a driver such as a buck converter or other type of driver, which drives the load based on the modulation of the control signal. During the on time of each period, the driver supplies current from a power supply to the load, while during the off time of each period the driver does not supply current from the power supply to the load. Hence the average power supplied to the load is dependent on the duty cycle: a higher duty cycle means the current is on for more of the time, and so the average power is higher; while conversely a lower duty cycle means the current is supplied for less of the time, and so the average power is lower.
By controlling the duty cycle (i.e. varying the on time relative to the PWM period or off time), the controller is thus able to control the average power with which the load is driven.
FIG. 1 is a schematic diagram of a circuit comprising a typical buck converter 4, employed for the purpose of controlling the power to a load based on pulse width modulation. As well as the buck converter 4, the circuit comprises a power supply 8, a load 6 and a controller 2 such as a suitably programmed microprocessor. The buck converter 4 comprises a switch 12, and inductor 14 and a diode 10. The switch 12 has a first contact connected to a second terminal of the power supply 8 (e.g. positive terminal) and a second contact connected to a first terminal of the inductor 14. The inductor 14 has a second terminal connected to a first terminal of the load 6, and the load 6 has a second terminal connected to a first terminal of the power supply 8. The diode 10 has a cathode connected to the first terminal of the inductor 8 (and to the second contact of the switch 12) and an anode connected to the second terminal of the load 6 (and the first terminal of the power supply 8). The switch 12 and power supply 8 are therefore connected in series with one another, and the inductor 14 and load are connected in series with one another, with the series arrangement of inductor 14 and load 6 being connected in parallel across the series arrangement of power supply 8 and switch 12, and the diode 10 also being connected in parallel across the series arrangement of power supply 8 and switch 12 (in reverse bias with the power supply 8).
Note that FIG. 1 shows a buck converter with a high-side switch. An alternative arrangement with a low side switch is shown in FIG. 2. The circuit is the same, except the switch 12 is connected between the other (first) terminal of the power supply and the second terminal of the load 6 (and anode of the diode 10), with the second (e.g. positive) terminal of the power supply 8 being connected to the first terminal of the inductor 8 (and cathode of the diode 8).
In either variant, the controller 2 is arranged to apply the pulse width modulated control signal to the input of the switch 12, thus generating a pulse width modulated input signal in the form of a voltage signal Vin. When the control signal is on (asserted, e.g. logic 1), the switch 12 is closed connecting the input voltage Vin to the supply 8. When the control signal is off (de-asserted, e.g. logic 0), the switch 12 is open and Vin is disconnected from the supply 8. As shown in FIG. 3, this results in a rectangular pulse width modulated input voltage Vin corresponding to the pulse width modulated control signal generated by the controller 2. This rectangular PWM input waveform is present at the anode of the diode 10 in the case of a high side switch (FIG. 1) or at the cathode in the case of a low side switch (FIG. 2). During the on times when Vin is connected to the supply 8, this allows current to flow from the power supply 8 through the inductor 14 and load 6. During the off times when Vin is disconnected from the supply, this means no current is supplied from the power supply 8 to the inductor 14 and load 6 (although some current may temporarily flow through the load 6 from the inductor 14 as the inductor de-energizes).
Note however that a buck converter is just one example. In general for drivers of LED lamps or other lamps, other forms of switched-mode power supply may also be used, e.g. a fly-back converter.
The controller 2 governs the duty cycle of the pulse width modulation in order to control the current or power supplied to the load, and therefore its output. Current is the property controlled in the case of LED drivers, but as the voltage drop across an LED is almost constant, this corresponds (almost) proportionally to power. For example in the case of a light source, the pulse width modulation controls the output power or intensity of the emitted light, or in the case of a motor this controls its speed. Many state-of-the-art LED drivers make use of buck converters for controlling the current through the LED(s) and thereby the level of light emitted by the LED(s). The frequency of the PWM waveform typically is of the order of 4 to 16 kHz. State-of-the-art coded light controllers can also encode data into the PWM waveform, by varying its duty cycle in order to produce a DC-free amplitude modulation in the visible light emitted by the LED(s).